package com.springboot.springbootlogindemo.utils.Constants;

public class RedisConstants {

    public static final String LOGIN_CODE_KEY = "login:code:";

    public static final Long LOGIN_CODE_TTL = 2L;

    public static final Long CACHE_NULL_TTL = 2L;

    public static final String LOCK_SHOP_KEY = "lock:shop:";

//    public static final String SONG_LIKED_RECORD = "like:song:record";
//
//    public static final String SONG_LIKED_COUNT = "like:song:count";
//
//    public static final String SONG_LIST_LIKED_RECORD = "like:songList:record";
//
//    public static final String SONG_LIST_LIKED_COUNT = "like:songList:count";


    public static final String LIKED_RECORD = "like:record";
    public static final String LIKED_COUNT = "like:count";


    /**
     * @param likedUserId 被点赞的人id
     * @param likedPostId 点赞的人的id
     * @return
     */
    public static String getRecordKey(String likedUserId, String likedPostId ) {
        return likedUserId +
                "::" +
                likedPostId;
    }

//    /**
//     * 获取保存点赞记录hash表的key
//     * @param infoType
//     * @return
//     */
//
//    public static String getBigKeyForRecord(String infoType) {
//        if (infoType.equals("0")) return SONG_LIST_LIKED_RECORD;
//        if (infoType.equals("1")) return SONG_LIKED_RECORD;
//        return "";
//    }
//
//    /**
//     * 获取保存点赞数量hash表的key
//     * @param infoType
//     * @return
//     */
//    public static String getBigKeyForCount(String infoType) {
//        if (infoType.equals("0")) return SONG_LIST_LIKED_COUNT;
//        if (infoType.equals("1")) return SONG_LIKED_COUNT;
//        return "";
//    }

}
